<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Sets the path for a domain</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.bindtextdomain" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">bindtextdomain</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">bindtextdomain</span> &mdash; <span class="dc-title">Sets the path for a domain</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.bindtextdomain-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>bindtextdomain</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$domain</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$directory</code></span>
   ) : <span class="type">string</span></div>

  <p class="para rdfs-comment">
   The <span class="function"><strong>bindtextdomain()</strong></span> function sets the path
   for a domain.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.bindtextdomain-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">domain</code></dt>

     <dd>

      <p class="para">
       The domain
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">directory</code></dt>

     <dd>

      <p class="para">
       The directory path
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.bindtextdomain-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   The full pathname for the <code class="parameter">domain</code> currently being set.
  </p>
 </div>

  
 <div class="refsect1 examples" id="refsect1-function.bindtextdomain-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2886">
    <p><strong>Example #1 <span class="function"><strong>bindtextdomain()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$domain&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'myapp'</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #0000BB">bindtextdomain</span><span style="color: #007700">(</span><span style="color: #0000BB">$domain</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'/usr/share/myapp/locale'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

    <div class="example-contents"><p>以上例程会输出：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
/usr/share/myapp/locale
</pre></div>
    </div>
   </div>
  </p>
 </div>

</div></div></div></body></html>